<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Siteinfo extends CF_Controller {
	public function __construct()
	{
		parent::__construct();
		
	}

	public function index()
	{
		$this->load->helper('file');
		$menu = $data['menu'] = $this->input->get('menu') ? $this->input->get('menu') : 'au';
		$data['au_nav'] = array(
			array('title'=>'关于我们', 'menu'=>'au'),
			array('title'=>'招贤纳士', 'menu'=>'hr'),
			array('title'=>'使用协议', 'menu'=>'protocol'),
			array('title'=>'联系方式', 'menu'=>'contact'),
			array('title'=>'网站地图', 'menu'=>'maps'),
			array('title'=>'友情链接', 'menu'=>'links'),
			array('title'=>'常用菜谱', 'menu'=>'common')
		);
		switch ($menu)
		{
			case 'hr':
				$data['title'] = '招贤纳士';
				$data['content'] = read_file('./data/siteinfo/hr.php');
			break;
			case 'protocol':
				$data['title'] = '使用协议';
				$data['content'] = read_file('./data/siteinfo/protocol.php');
			break;
			case 'contact':
				$data['title'] = '联系方式';
				$data['content'] = read_file('./data/siteinfo/contact.php');
			break;
			case 'maps':
				$data['title'] = '网站地图';
				$data['content'] = read_file('./data/siteinfo/maps.php');
			break;
			case 'links':
				$data['title'] = '友情链接';
				$data['content'] = read_file('./data/siteinfo/links.php');
			break;
			case 'common':
				$data['title'] = '常用菜谱';
				$data['content'] = read_file('./data/siteinfo/common.php');
			break;

			default:
				$data['title'] = '关于我们';
				$data['content'] = read_file('./data/siteinfo/au.php');
		}
		
		$this->load->view('siteinfo', $data);
	}
}

/* End of file siteinfo.php */
/* Location: ./application/controllers/siteinfo.php */